#pragma pack_matrix(row_major)

#include "../Defs/ConstantBuffers.hlsli"

struct gs_in
{
	float3 position : POSITION;
};

struct gs_out
{
	float4 position : SV_POSITION;
	float2 texCoord : TEXCOORD;
};

[maxvertexcount(6)]
void main(point gs_in vertex[1], inout TriangleStream<gs_out> output)
{
	gs_out vertecies[] =
	{
		float4(region.left, region.top, 0.f, 1.f), float2(texRect.left, texRect.top),
		float4(region.right, region.bottom, 0.f, 1.f), float2(texRect.right, texRect.bottom),
		float4(region.left, region.bottom,0.f, 1.f), float2(texRect.left, texRect.bottom),

		float4(region.left, region.top, 0.f, 1.f),float2(texRect.left, texRect.top),
		float4(region.right, region.top, 0.f, 1.f), float2(texRect.right, texRect.top),
		float4(region.right, region.bottom, 0.f, 1.f), float2(texRect.right, texRect.bottom),
	};

	for (int i = 0; i < 6; i++)
	{
		output.Append(vertecies[i]);
	}
}